package oss

import (
	"fmt"
	"runtime"
)

const (
	BucketPublicReadWrite = "public-read-write"
	BucketPublicRead      = "public-read"
	BucketPrivate         = "private"
)

var (
	EmptyStruct  = struct{}{}
	SubResources = map[string]struct{}{
		"acl":            EmptyStruct,
		"uploadId":       EmptyStruct,
		"partNumber":     EmptyStruct,
		"uploads":        EmptyStruct,
		"logging":        EmptyStruct,
		"website":        EmptyStruct,
		"location":       EmptyStruct,
		"lifecycle":      EmptyStruct,
		"referer":        EmptyStruct,
		"cors":           EmptyStruct,
		"delete":         EmptyStruct,
		"append":         EmptyStruct,
		"position":       EmptyStruct,
		"security-token": EmptyStruct,
	}
)

var (
	OssVersion         = "0.0.1"
	OssProvider        = "OSS" // default Provider
	AwsProvider        = "AWS"
	AliyunOssHost      = "oss.aliyuncs.com"
	DefaultContentType = "application/octet-stream"
	OssHeaderPrefix    = "x-oss-"
	AWsHeaderPrefix    = "x-amz-"
	DefaultUserAgent   = fmt.Sprintf("aliyun-sdk-oss-go/%s (%s/%d/%s;%s)", OssVersion, runtime.GOOS, runtime.NumCPU(), runtime.GOARCH, runtime.Version())
	OssHostList        = []string{
		"aliyun-inc.com", "aliyuncs.com", "alibaba.net", "s3.amazonaws.com",
	}
	BucketLocations = []string{
		"oss-cn-hangzhou", "oss-cn-qingdao", "oss-cn-beijing", "oss-cn-hongkong",
		"oss-cn-shenzhen", "oss-cn-shanghai", "oss-us-west-1", "oss-ap-southeast-1",
	}
	DefaultBucketLocation = "oss-cn-hangzhou"
	BucketPermissions     = []string{
		"public-read-write", "public-read", "private",
	}
	DefaultBucketPermission = "private"
)

const (
	InvalidArgument = iota
)

const (
	MaxKeySize = 1000
)
